package com.rickpan.dto.request;

import jakarta.validation.constraints.NotBlank;

/**
 * 创建文件夹请求DTO
 */
public class CreateFolderRequest {
    
    @NotBlank(message = "文件夹名称不能为空")
    private String folderName;
    
    private Long parentId;
    
    // 构造函数
    public CreateFolderRequest() {}
    
    public CreateFolderRequest(String folderName) {
        this.folderName = folderName;
    }
    
    public CreateFolderRequest(String folderName, Long parentId) {
        this.folderName = folderName;
        this.parentId = parentId;
    }
    
    // Getter和Setter方法
    public String getFolderName() {
        return folderName;
    }

    public void setFolderName(String folderName) {
        this.folderName = folderName;
    }

    // 兼容性方法 - 为了与新的FolderController兼容
    public String getName() {
        return folderName;
    }

    public void setName(String name) {
        this.folderName = name;
    }
    
    public Long getParentId() {
        return parentId;
    }
    
    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }
    
    @Override
    public String toString() {
        return "CreateFolderRequest{" +
                "folderName='" + folderName + '\'' +
                ", parentId=" + parentId +
                '}';
    }
}
